    <script type="text/javascript">
        function editProfile(){
            
            $('#editProfile').toggle(
            function() {
                //$('.profile input').attr('disabled', 'disabled');
                $('.profile input').attr('disabled', '');
                $('.formButton').show();
            });
        }
            
         function disableInput(){
             $('.profile input').attr('disabled', 'disabled');
             $('.formButton').hide();
             $('#editProfile').show();
         }
    </script>
    <h2>Profile</h2>
        <input type="button" class="button" name="editProfile"  onclick="editProfile()" id="editProfile" value="Edit" style="margin-top:12px; margin-right: 12px; float:right; position: absolute; top:100px; left:870px;"/>

    <div class="profile">
        <div class="profileFields">
            <div class="profileField">
                <label>Name:</label>
                <input type="text" name="profileName" id="profileName" value="<?=$this->session->userdata('name')?>" disabled/>
                <label>Last name:</label>
                <input type="text" name="profileLastname" id="profileLastname" value="<?=$this->session->userdata('last_name')?>" disabled/>
                <!--label>Partner</label>
                <input type="text" name="profilePartner" id="profilePartner" value="<?=$this->session->userdata('partner')?>"/-->
                <label>Function:</label>
                <input type="text" name="profileFunction" id="profileFunction" value="<?=$this->session->userdata('job_description')?>" disabled/>
                <!--label>Roll:</label>
                <input type="text" name="profileRoll" id="profileRoll" value="<?=$this->session->userdata('roll')?>" /-->
            </div>

            <div class="profileField">
                <label>Picture:</label>
                <input type="text" name="profilePicture" id="profilePicture" value="<?=$this->session->userdata('picture')?>" disabled/>
                <label>Email:</label>
                <input type="text" name="profileEmail" id="profileEmail" value="<?=$this->session->userdata('email_address')?>" disabled/>
                <label>Phone:</label>
                <input type="text" name="profilePhone" id="profilePhone" value="<?=$this->session->userdata('phone_number')?>" disabled/>
            </div>
        </div>
        
        <div class="profileGroups">
            <div class="profileGroup">
                <fieldset>
                    <legend>Contact:</legend>
                    <label>Address:</label>
                    <input type="text" name="profileAddress" id="profileAddress" value="<?=$this->session->userdata('address')?>" disabled/>
                    <label>Postal code:</label>
                    <input type="text" name="profilePostalcode" id="profilePostalcode" value="<?=$this->session->userdata('postalcode')?>" disabled/>
                    <label>City:</label>
                    <input type="text" name="profileCity" id="profileCity" value="<?=$this->session->userdata('city')?>" disabled/>
                    <label>Extra:</label>
                    <input type="text" name="profileExtra" id="profileExtra" value="<?=$this->session->userdata('extra')?>" disabled/>
                </fieldset>
            </div>

            <div class="profileGroup">
                <fieldset>
                    <legend>Social Media:</legend>
                    <label>Facebook:</label>
                    <input type="text" name="profileFacebook" id="profileFacebook" value="<?=$this->session->userdata('facebook')?>" disabled/>
                    <label>Linkedin:</label>
                    <input type="text" name="profileLinkedin" id="profileLinkedin" value="<?=$this->session->userdata('linkedin')?>" disabled/>
                    <label>Twitter:</label>
                    <input type="text" name="profileTwitter" id="profileTwitter" value="<?=$this->session->userdata('twitter')?>" disabled/>
                    <label>Other:</label>
                    <input type="text" name="profileOther" id="profileOther" value="<?=$this->session->userdata('other')?>" disabled/>
                </fieldset>
            </div>
        </div>
            
    </div>
    <div class="formButton" style="display:none; position:absolute; top:570px; left:780px;">
        <input type="button" id="cancel" value="Cancel" class="button" onclick="disableInput()"/>
        <input type="button" id="update" value="Save" class="button"/>
    </div>
    
  